home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group00b.txt
/
000099_icon-group-sender_Tue Oct 24 13:27:21 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2001-01-03
|
1KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id e9OKRDH24369
for icon-group-addresses; Tue, 24 Oct 2000 13:27:13 -0700 (MST)
Message-Id: <200010242027.e9OKRDH24369@baskerville.CS.Arizona.EDU>
From: Parvinder Kaur <kaurp@cs.ucdavis.edu>
X-Newsgroups: comp.lang.icon
Subject: writing a subset of Prolog
Date: Tue, 24 Oct 2000 13:10:54 -0700
X-Trace: mark.ucdavis.edu 972418256 8189 169.237.5.128 (24 Oct 2000 20:10:56 GMT)
X-Complaints-To: usenet@ucdavis.edu
To: icon-group@cs.arizona.edu
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 770
Hi,
I am writing a subset of Prolog with Icon for a project.
I'm stumped at a particular problem (mostly due to my unfamiliarity with
the Icon language). The problem is the parse the following type of input:
book(king) and color(white,blue). As "book(king)" is parsed "book" should
be stored as a key value in a table and it's values should be composed of
a list of lists- the arguments (for book it would be king, for color the
arguments would be white and blue). It would resemble something like
this: db[book] := [[king]] and db[color] := [[white] [blue]]
The table is indexed by the predicate and the table entry for a predicate
is a list of defined facts.
Does anyone have any ideas or suggetions on how to approach this problem.
I'd appreciate any help.
-C